package com.service;

import com.dao.ResultDao;
import com.entity.Result;
import com.query.ResultQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ResultService {

    @Autowired
    ResultDao resultDao;

    public int add(Result result){
        return resultDao.add(result);
    }

    public List<Result> queryAll(){
        return resultDao.queryAll();
    }

    public List<Result> queryAllByCondition(ResultQuery query){
        return resultDao.queryAllByCondition(query);
    }
}
